import request from '@/config/axios'

export interface WageProcessValuationVO {
  id: number
  dictProcessName: number
  drawingNumber: string
  dictBaitingType: number
  dictProcessValuationStatus: number
  remark: string
  dictCraftType: number
  unitPrice: number
  dictValuationUnit: number
  dictMachiningProcess: number
  relationVo:[]
}

// 查询工序记价列表
export const getWageProcessValuationPage = async (params) => {
  return await request.get({ url: `/config/wage-process-valuation/page`, params })
}

// 查询工序记价详情
export const getWageProcessValuation = async (id: number) => {
  return await request.get({ url: `/config/wage-process-valuation/get?id=` + id })
}

// 新增工序记价
export const createWageProcessValuation = async (data: WageProcessValuationVO) => {
  return await request.post({ url: `/config/wage-process-valuation/create`, data })
}

// 修改工序记价
export const updateWageProcessValuation = async (data: WageProcessValuationVO) => {
  return await request.put({ url: `/config/wage-process-valuation/update`, data })
}

// 删除工序记价
export const deleteWageProcessValuation = async (id: number) => {
  return await request.delete({ url: `/config/wage-process-valuation/delete?id=` + id })
}

// 导出工序记价 Excel
export const exportWageProcessValuation = async (params) => {
  return await request.download({ url: `/config/wage-process-valuation/export-excel`, params })
}

// 获取机加列表
export const getWageMachiningData = async (params) => {
  return await request.get({ url: `/config/wage-machining-unit-price/list`, params })
}

// 获取油漆电工列表
export const getWagePaintData = async (params) => {
  return await request.get({ url: `/config/wage-paint-unit-price/list`, params })
}
